#!/usr/bin/bash

list+="double"
list+="enum"
list+="break"
list+="case"
list+="while "
list+="for "
list+="int "
list+="float "
list+="struct "
list+="char "
list+="union "
list+="main "
list+="void "
list+="do "
list+="return "

while true
do
	read -p "请输入要检测的变量： " var
	v1=`echo $var | sed 's/^[0-9]//'`  #判断是否以数字开头
		if [ $v1 !=  $var ]; then
			echo "No"
			continue
		fi

	v2=`echo $var | sed 's/[a-zA-Z0-9_]*//'`  ## 判定是否包含非法字符（仅包含大小大小写和数字、下划线
		if [ ! -z $v2 ]; then
		 echo "No"
		 continue
		 fi
	
	flag=1
	for key_word in $list  
	do
		#echo "$key_word"
		if [ $var == $key_word ]; then
				echo "No"
				flag=0
				break
		fi


	done

	if [ $flag -eq 1 ]; then  #利用标志位来判断是否符合要求
		echo "yes"
	fi

done	



